/**
 * after
 *
 */

const after = (times, callback) => () => {
  if (--times === 0) {
    callback();
  }
};
const newFn = after(3, () => {
  console.log("ok");
});
console.log(newFn())
console.log(newFn())
console.log(newFn())
